/*
* @moudule:@/views/budget/examine/examineDetail
* @author:zm
* @date:2020-11-17
* 审核详情
*/

<template>
  <div class="productView_container">
    <header>
      <p>审核详情</p>
    </header>
    <main>
      <el-form :inline="true" :model="formInline" class="main_searchBar">
        <el-form-item class="fr">
          <el-button size="small" plain @click="$router.back(-1)">返回</el-button>
        </el-form-item>
      </el-form>
      <el-table id="table" size="mini" :header-cell-style="{background:'#eef1f6'}" :data="tableData" border style="width: 100%"
        v-loading="showTableLoading">
        <el-table-column prop="acctMonth" label="账期"></el-table-column>
        <el-table-column prop="areaId" label="区域id"></el-table-column>
        <el-table-column prop="areaName" label="区域名称"></el-table-column>
        <el-table-column prop="indexCode" label="指标编码"></el-table-column>
        <el-table-column prop="indexName" label="指标名称"></el-table-column>
        <el-table-column prop="custCode" label="省CRM客户编码"></el-table-column>
        <el-table-column prop="indexValue" label="调整金额（税后元）"></el-table-column>
        <el-table-column prop="remark" label="调整说明"></el-table-column>
      </el-table>
    </main>
  </div>
</template>

<script>
  import {
    $budgetAPI,
    $budget
  } from '@/api';
  import {
    setSessionStorage,
    getSessionStorage,
    removeSessionStorage
  } from '@/common/js/storage';
  export default {
    data() {
      return {
        formInline: {
          logId: ''
        },
        tableData: [],
        showTableLoading: false,
      };
    },
    mounted() {},
    methods: {
      handle_search() {
        this.showTableLoading = true;
        $budgetAPI.getrestoreImportdetails(
          this.formInline,
          res => {
            if (res.code == 0) {
              this.tableData = res.content.content.data;
            }
            this.showTableLoading = false;
          },
          err => {
            this.showTableLoading = false;
          }
        );
      },
    },
    created() {
      this.accountInfo = JSON.parse(getSessionStorage('accountInfo'));
      this.formInline.logId = this.$route.query.logid;
      this.handle_search()
    }
  };
</script>

<style lang="scss" scoped>
  .productView_container {
    width: 100%;
    height: 100%;
    &>header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid #eaeaea;
      height: 40px;
      margin: 0 -20px;
      padding: 0 20px;
      &>p {
        font-weight: bold;
        font-size: 15px;
      }
    }
    &>main {
      padding: 0 10px 10px;
      .main_searchBar {
        border-bottom: 1px solid #d6d9e5;
        /deep/ .el-form-item {
          margin: 6px 10px 6px 0;
        }
        #search_btn {
          background-color: #2a90de;
        }
        #export_btn {
          background-color: #2cd531;
        }
      }
      .main_navBar {
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .area {
          text-align: left;
          display: flex;
          .it {
            cursor: pointer;
            font-size: 14px;
            display: inline-block;
            .td {
              font-weight: bold;
            }
            &:last-child {
              span {
                &:last-child {
                  display: none;
                }
              }
            }
          }
        }
      }
    }
  }
</style>
